let person: string = '管姐'
let age: number = 18
let flag: boolean = true
let un: undefined = undefined
let nu: null = null
let sy: symbol = Symbol('1')
let big: bigint = 123n
let obj: object = { person, age }



function foo(): string {
  return '1'
}

const arr1: string[] = ['1', '2']    // 字符串数组
const arr2: Array<string> = []   // 泛型

// 元组  可以放任意类型在里面的数组
const arr3: [string, number?, boolean?] = ['1', 2]
// console.log(arr3[100]);

const arr4: [name: string, age: number] = ['张三', 18]

const [el1, el2, ...rest] = arr4



interface IDescciption {
  readonly name: string
  age: number
  gender: boolean
  like?: string
}

const obj1: IDescciption = {
  name: '张三',
  age: 18,
  gender: true,
  like: '吃',
}
// obj1.name='李四'


